import request from "@/utils/request.js";

export const Reviews = () => {
  return request.get("/reviews/all");
};

//登录
export const goLogin = (data) => {
  return request.post("/auth/login", data);
};
//首页响应率部分的数据
export const Dashboard = (data) => {
  return request.get("/dashboard", data);
};
//home八个饼图的数据
export const reviewSentimentCategories = (data) => {
  return request.get("/dashboard/categories", data);
};
//首页八个饼图，Traveller Countries,部分的数据
export const getDashboardDynamic = (params) => {
  return request.get("/dashboard/dynamic", params);
};

//评论页面的1条数据
export const sentimentReview = (reviewId) => {
  return request.get(`/sentiment/${reviewId}`);
};

//评论页面的全部数据
export const getSentimentReview = (params) => {
  return request.get("/sentiment", params);
};

//登录之后选择酒店
export const getDashboardHotels = () => {
  return request.get("/dashboard/hotels");
};
//morning ,两个进度条的数据

export const getDashboardMorning = (params) => {
  return request.get("/dashboard/morning-briefing", params); // 关键：接收params并传递给request.get
};
